@extends('admin.index')
@section('content')
    <style>
    </style>
    <div class="layui-main">
            {{--<input type="hidden" name="_token" value="{{ csrf_token() }}" />--}}
            <fieldset class="layui-elem-field">
                <legend>商品详情</legend>
                <div class="layui-field-box">
                    <div class="layui-form-item">
                        <label class="layui-form-label">订单号：</label>
                        <div class="layui-input-block">
                            <span style="float:left;margin-top: 8px;">{{$order_info['order_number']}}</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">订单状态：</label>
                        <div class="layui-input-block">
                            <span style="float:left;margin-top: 8px;">{{$order_info['order_status']==1?'未支付':'已支付'}}</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">订单金额：</label>
                        <div class="layui-input-block">
                            <span style="float:left;margin-top: 8px;">{{$order_info['price_sum']}}</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">实付金额：</label>
                        <div class="layui-input-block">
                            <span style="float:left;margin-top: 8px;">{{$order_info['actual_sum']}}</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">消耗积分：</label>
                        <div class="layui-input-block">
                            <span style="float:left;margin-top: 8px;">{{$order_info['integral']}}</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">地址信息：</label>
                        <div class="layui-input-block">
                            <span style="float:left;margin-top: 8px;">{{$order_info['username'] .'     '.$order_info['phone'].'  '.$order_info['address']}}</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品信息：</label>
                        <div class="layui-input-block">
                            <table class="layui-table streamtable" lay-skin="line">
                                <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>商品图片</th>
                                    <th>商品名称</th>
                                    <th>金额</th>
                                    <th>数量</th>
                                </tr>
                                </thead>
                                <tbody>
                                @if(!empty($order_goods))
                                    @foreach($order_goods as $k=>$v)
                                        <tr>
                                            <td><p class="wordpro">{{$v['id']}}</p></td>
                                            <td><p class="wordpro"><img src="{{isset($v['goods_cover'])?$v['goods_cover']:''}}" class="tdcustomerhead"></p></td>
                                            <td><p class="wordpro">{{$v['title']}}</p></td>
                                            <td><p class="wordpro">{{$v['discount_price']}}</p></td>
                                            <td><p class="wordpro">{{$v['num']}}</p></td>
                                        </tr>
                                    @endforeach
                                @endif
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </fieldset>
    </div>
    <script>
        $(function () {
            $('#form_data').submit(function(){
                var $phone = $('input[name=phone]').val();
                var $pass = $('input[name=pass]').val();
                var $nickname = $('input[name=nickname]').val();
                if (!$phone) {
                    layer.msg('账号不能为空', {icon: 5, time:1500});
                    return false;
                }
                if (!$pass) {
                    layer.msg('密码不能为空', {icon: 5, time:1500});
                    return false;
                }
                if (!$nickname) {
                    layer.msg('昵称不能为空', {icon: 5, time:1500});
                    return false;
                }
                $preg = /^[0-9A-Za-z\-_\.]{4,16}$/;
                if (!$preg.test($phone)) {
                    layer.msg('账号格式错误，账号只能由4-16位的字母、数字、下划线、中划线、点组成', {icon: 5, time:5000, btn:['明白啦']});
                    return false;
                }
                $preg = /^[0-9A-Za-z\-_\.\!\@\#\%\^\&\*]{6,16}$/;
                if (!$preg.test($pass)) {
                    layer.msg('密码格式错误，账号只能由6-16位的字母、数字、下划线、中划线、点等字符组成', {icon: 5, time:5000, btn:['明白啦']});
                    return false;
                }




                /*$.ajax({
                    url : '/adm/video/doaddbanner',
                    type : 'post',
                    dateType : 'json',
                    data : $('#form_data').serialize(),
                    success : function(msg){
                        layer.msg(msg.msg, {icon: 6});
                        console.log(msg);
                        return false;
                        window.location.href = '{{url("adm/video/bannerlist")}}';
                    },
                    error : function(msg){
                        console.log(msg);
                    }
                });*/

            })
        })

    </script>
@endsection

